const BUYER_BILL_OPERATE_SUCCESS = Symbol('BUYER_BILL_OPERATE_SUCCESS');
const BUYER_BILL_OPERATE_FAIL = Symbol('BUYER_BILL_OPERATE_FAIL');


export default function (state = { loading: false }, action = {}) {
  switch (action.type) {

    case BUYER_BILL_OPERATE_SUCCESS:
      return {
        ...state,
      };

    case BUYER_BILL_OPERATE_FAIL:
      return {
        ...state,
        error: action.msg
      };

    default:
      return state;
  }
}

// post弹窗修改的数据
export function buyerBillOperate(values) {
  return {
    types: [BUYER_BILL_OPERATE_SUCCESS, BUYER_BILL_OPERATE_FAIL],
    promise: ( client ) => client.post('/order/platform/orderInvoice/orderInvoiceUpdate', { data: values })
  }
}
